import http from '@/utils/http/axios'
import {ContentTypeEnum} from '@/enums/httpEnum'

enum Api {
    serverlogList = '/serverlog/list',
    serverlogCreate = '/serverlog/create',
    serverlogDelete = '/serverlog/delete',
    serverlogUpdate = '/serverlog/update',
}

/**
 * @description: 修改
 */
export function serverlogUpdate(params: any) {
    return http.request({
        url: Api.serverlogUpdate,
        method: 'POST',
        params,
    },{
        isTransformRequestResult: false,
        isShowMessage: true,
        successMessageText: '修改成功',
        errorMessageText: '修改失败'
    })
}

/**
 * @description: 删除
 */
export function serverlogDelete(params: any) {
    return http.request({
        url: Api.serverlogDelete,
        method: 'POST',
        params,
    },{
        isTransformRequestResult: false,
        isShowMessage: true,
        successMessageText: '删除成功',
        errorMessageText: '删除失败'
    })
}

/**
 * @description: 添加
 */
export function serverlogCreate(params: any) {
    return http.request({
        url: Api.serverlogCreate,
        method: 'POST',
        params,
    },{
        isTransformRequestResult: false,
        isShowMessage: true,
        successMessageText: '添加成功',
        errorMessageText: '添加失败'
    })
}

/**
 * @description: 获取
 */
export function serverlogList(params: any) {
    return http.request({
        url: Api.serverlogList,
        method: 'GET',
        params,
    },{
        isTransformRequestResult: false
    })
}
